#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    char arr[1000];
    char c = '0';
    int i = 0;
    while (c != '\n')
    {
        scanf("%c", &c);
        arr[i] = c;
        i++;
    }
    for (int n = 0; n < i; n++)
    {
        if (arr[n] >= 65 && arr[n] <= 89)
        {
            arr[n] += 33;
        }
        else if (arr[n] == 90)
        {
            arr[n] = 97;
        }
        
        {
            arr[n] -= 31;
        }
        else if (arr[n] == 97)
        {
            arr[n] = 90;
        }
        printf("%c", arr[n]);
    }
    return 0;
}